package com.wnn.demo;

import com.wnn.demo.utils.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * 项目程序启动类
 */
@SpringBootApplication
@EnableSwagger2
@MapperScan("com.wnn.demo.model.*.mapper")
public class StartApplication {

    public static void main(String[] args) {
        SpringApplication.run(StartApplication.class, args);
        System.out.println("web server start success !");
    }

    @Bean
    public IdWorker idWorker(){
        return new IdWorker();
    }

    @Bean
    public CaptchaUtil captchaUtil(){
        return new CaptchaUtil();
    }
}
